package com.t01.bdqn.service.impl;


import com.t01.bdqn.entity.ComputerRoom;
import com.t01.bdqn.entity.dto.ComputerRoomQuery;
import com.t01.bdqn.mapper.ComputerRoomMapper;
import com.t01.bdqn.service.ComputerRoomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.io.IOException;
import java.sql.SQLException;
import java.sql.Time;
import java.util.List;

@Component("computerRoomService")
public class ComputerRoomServiceImpl implements ComputerRoomService {
    public ComputerRoomServiceImpl() {
        System.out.println("ComputerRoomServiceImpl 被创建");
    }


    @Autowired
    ComputerRoomMapper computerRoomMapper;



    @Override
    public List<ComputerRoom> ComputerSet(int pageNo, int count) throws SQLException, IOException, ClassNotFoundException {
        return computerRoomMapper.ComputerSet(pageNo,count);
    }

    @Override
    public void test() throws InterruptedException {
        System.out.println("hah");
        Thread.sleep(1000);
    }

    @Override
    public List<ComputerRoom> ComputerSet(ComputerRoomQuery computerRoomQuery) throws SQLException, IOException, ClassNotFoundException {

        return computerRoomMapper.ComputerSetByQuery(computerRoomQuery);
    }

    @Override
    public int ComputerSetCount(ComputerRoomQuery computerRoomQuery) throws SQLException, IOException, ClassNotFoundException {
        //调用mapper层查询总数
        return 0;
    }

}
